package com.johnsoft.mc;

import java.util.HashMap;

public class Version {

	private HashMap<String, String> versionToHash;
	private HashMap<String, String> hashToVersion;
	
	public Version() {
		versionToHash = new HashMap<String, String>();
		hashToVersion = new HashMap<String, String>();
		/**
		 * Add Versions of minecraft from the file: %appdata%/Roaming/.minecraft/bin/version
		 */
		registerVersion("1.1", "1326382442000");
	}
	
	public void registerVersion(String version, String hash)
	{
		versionToHash.put(version, hash);
		hashToVersion.put(hash, version);
	}
	
	public String getVersion(String input) {
		return (versionToHash.get(input) == null) ? "Unkown Version Hash for: \"" + input + "\"" : versionToHash.get(input);
	}
	
}
